define([
	'jquery',
	'backbone',
	'hbs!templates/book',
], function ($, Backbone, template) {

	BookView = Backbone.View.extend({

		initialize: function () {
			if (this.model) {
				this.model.on('change', this.render, this);
			}
		},

		render: function () {
			var json = this.model.toJSON();
			var html = template(json);
			this.$el.html(html);
		}
	});
	return BookView;
});

	